package com.example.activemq.task;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import com.example.activemq.config.QueueConfig;

import javax.jms.Queue;

/**
 * @application:
 * @author: LiYuhang
 * @Date: 2021/4/3 20:01
 * @version: 0.1
 * @Description :
 * @Modified By:
 */
@Component
@EnableScheduling
public class MessageProducter {
    @Autowired
    private JmsMessagingTemplate jmsMessagingTemplate;

    /**
     * @Description:   注入制定的队列 {@link QueueConfig#queue()}
     * @Author: LiYuhang
     * @return
     */
    @Autowired
    private Queue queue;

    @Scheduled(cron="0/59 * * * * ? ")
    public void messageProducter() {

    }


}
